package com.diandian.backend.client.param;

import com.diandian.backend.client.dto.ClientSettingPageParamDTO;
import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;

public class ClientSettingPageParam implements Serializable {

	private Integer pageNum;
	private Integer pageSize;
	private String clientIdEql;
	private String clientIdLike;
	private String typeEql;
	private String typeLike;
	private String paramKeyEql;
	private String paramKeyLike;
	private String paramValueEql;
	private String paramValueLike;
	private Integer del;

	public void check(){
		if(this.pageNum == null || this.pageNum < 1 || this.pageSize == null || this.pageSize < 1){
			throw new DefaultException("分页参数不合法");
		}
	}

	public ClientSettingPageParamDTO toDTO(){
		ClientSettingPageParamDTO result = new ClientSettingPageParamDTO();
		result.setPageNum(this.pageNum);
		result.setPageSize(this.pageSize);
		result.setClientIdEql(this.clientIdEql);
		result.setClientIdLike(this.clientIdLike);
		result.setTypeEql(this.typeEql);
		result.setTypeLike(this.typeLike);
		result.setParamKeyEql(this.paramKeyEql);
		result.setParamKeyLike(this.paramKeyLike);
		result.setParamValueEql(this.paramValueEql);
		result.setParamValueLike(this.paramValueLike);
		result.setDel(this.del);
		return result;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public String getClientIdEql() {
		return clientIdEql;
	}
	public void setClientIdEql(String clientIdEql) {
		this.clientIdEql = clientIdEql;
	}
	public String getClientIdLike() {
		return clientIdLike;
	}
	public void setClientIdLike(String clientIdLike) {
		this.clientIdLike = clientIdLike;
	}
	public String getTypeEql() {
		return typeEql;
	}
	public void setTypeEql(String typeEql) {
		this.typeEql = typeEql;
	}
	public String getTypeLike() {
		return typeLike;
	}
	public void setTypeLike(String typeLike) {
		this.typeLike = typeLike;
	}
	public String getParamKeyEql() {
		return paramKeyEql;
	}
	public void setParamKeyEql(String paramKeyEql) {
		this.paramKeyEql = paramKeyEql;
	}
	public String getParamKeyLike() {
		return paramKeyLike;
	}
	public void setParamKeyLike(String paramKeyLike) {
		this.paramKeyLike = paramKeyLike;
	}
	public String getParamValueEql() {
		return paramValueEql;
	}
	public void setParamValueEql(String paramValueEql) {
		this.paramValueEql = paramValueEql;
	}
	public String getParamValueLike() {
		return paramValueLike;
	}
	public void setParamValueLike(String paramValueLike) {
		this.paramValueLike = paramValueLike;
	}
	public Integer getDel() {
		return del;
	}
	public void setDel(Integer del) {
		this.del = del;
	}
}
